<?php

namespace app\index\controller;

use app\common\Test;
use think\Facade;

class Demo2{
	public function index($name = 'SunRock'){
		$test = new Test();
		return $test->hello($name);
	}
	
	public function index2($name = 'SunRock'){
		return \app\facade\Test::hello($name);
	}
	
	function index3($name = 'SunRock'){
		Facade::bind('app\facade\Temp','app\common\Temp');
		\app\facade\Temp::setName('xxxxx');
		return \app\facade\Temp::getName();
	}
}